package com.gticket.orderservice.mapper;

import com.gticket.orderservice.pojo.ActualSeat;
import com.gticket.orderservice.pojo.OrderItems;
import com.gticket.orderservice.provider.ActualSeatProvider;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.UpdateProvider;
import org.springframework.stereotype.Repository;

/**
 * @author 伴你时光尽头
 * @create 2019-11-28 11:24
 */
@Repository
public interface ActualSeatMapper {


    /**
     * 根据订单项中的fs_id查询实际座位表数据
     *
     * @param items
     * @return
     */
    @Select("select * from ${databasename}.actualseat where as_id=(select as_id from ${databasename}.filmschedule where fs_id=#{fs_id})")
    public ActualSeat selectActualSeatByAs_id(OrderItems items);


    @UpdateProvider(method = "changeRow", type = ActualSeatProvider.class)
    public void changeRow(ActualSeat actualSeat);
}
